package it.unibo.mumu.util;

public class AddressUrl {
	
	String currentAddress;
	String url_XmlAllUniverses;
    String url_AvatarZip;
    String url_XmlSelectedUniverse;
    String url_ZipResource;

	public AddressUrl() {
		super();
		this.currentAddress = "213.174.178.61";
		this.url_XmlAllUniverses = "https://"+currentAddress+":8181/getUniverseList";
		this.url_AvatarZip = "https://"+currentAddress+":8181/Universes/avatar.zip";
		this.url_XmlSelectedUniverse = "https://"+currentAddress+":8181/GetSelectUniverse?";
		this.url_ZipResource = "https://"+currentAddress+":8181/Universes/";
	}

	public String getUrl_ZipResource() {
		return url_ZipResource;
	}

	public void setUrl_ZipResource(String url_ZipResource) {
		this.url_ZipResource = url_ZipResource;
	}

	public String getCurrentAddress() {
		return currentAddress;
	}

	public void setCurrentAddress(String currentAddress) {
		this.currentAddress = currentAddress;
	}

	public String getUrl_XmlAllUniverses() {
		return url_XmlAllUniverses;
	}

	public void setUrl_XmlAllUniverses(String url_XmlAllUniverses) {
		this.url_XmlAllUniverses = url_XmlAllUniverses;
	}

	public String getUrl_AvatarZip() {
		return url_AvatarZip;
	}

	public void setUrl_AvatarZip(String url_AvatarZip) {
		this.url_AvatarZip = url_AvatarZip;
	}

	public String getUrl_XmlSelectedUniverse() {
		return url_XmlSelectedUniverse;
	}

	public void setUrl_XmlSelectedUniverse(String url_XmlSelectedUniverse) {
		this.url_XmlSelectedUniverse = url_XmlSelectedUniverse;
	}
	
	public void addIdUniverseForXmlRequest(String[] arrayID){
		
		if(arrayID.length>0 && arrayID.length<4){
			for(int i=0; i<arrayID.length;i++){				
				if( i==0 ){
		            this.url_XmlSelectedUniverse += "u1=" + arrayID[0];
		        }else if(i == 1){
		        	this.url_XmlSelectedUniverse += "&u2=" + arrayID[1];
		        }else if( i==2 ){
		        	this.url_XmlSelectedUniverse += "&u3=" + arrayID[2];
		        }
			}
		}
	}
	
	
    
}
